home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 543 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  989 b 

  1. Path: ix.netcom.com!netnews
  2. From: miker3@ix.netcom.com (Mike Rubenstein)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Is this ok: *pointer++ = value ??
  5. Date: Sat, 06 Jan 1996 22:46:42 GMT
  6. Organization: Netcom
  7. Message-ID: <30eefb76.72646976@nntp.ix.netcom.com>
  8. References: <4cklvv$nmm@alcor.usc.edu> <4cmmcd$e3u@gryphon.phoenix.net>
  9. NNTP-Posting-Host: ix-dc13-13.ix.netcom.com
  10. X-NETCOM-Date: Sat Jan 06  2:46:25 PM PST 1996
  11. X-Newsreader: Forte Agent .99c/16.141
  12.  
  13. brucew@phoenix.net (Bruce Wedding) wrote:
  14.  
  15. |>wawda@alcor.usc.edu (Abu Wawda) wrote:
  16. |>
  17. |>>    for (i=0; i<50; i++) *pointer++ = i;
  18. |>
  19. |>>My only problem is why? I mean you aren't allowed to do:
  20. |>
  21. |>>                 for (i=0; i<50; i++) p++ = i;
  22. |>
  23. |>Sure you can do that.  You are assigning addresses to the pointer.
  24. It
  25. |>probably isn't too smart, but it is legal.
  26.  
  27. In what language is it legal?  Certainly not C which requires a
  28. modifiable lvalue as the right operand of = and defines p++ as not
  29. being an lvalue.
  30.  
  31. Michael M Rubenstein
  32.